package cn.iocoder.yudao.module.biz.dal.mysql.htHiddentroubleannexs;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.biz.dal.dataobject.htHiddentroubleannexs.HtHiddentroubleannexsDO;
import cn.iocoder.yudao.module.infra.dal.dataobject.oss.OssDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.biz.controller.admin.htHiddentroubleannexs.vo.*;

/**
 * 隐患附件 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface HtHiddentroubleannexsMapper extends BaseMapperX<HtHiddentroubleannexsDO> {

    default PageResult<HtHiddentroubleannexsDO> selectPage(HtHiddentroubleannexsPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<HtHiddentroubleannexsDO>()
                .eqIfPresent(HtHiddentroubleannexsDO::getHtId, reqVO.getHtId())
                .eqIfPresent(HtHiddentroubleannexsDO::getOssId, reqVO.getOssId())
                .eqIfPresent(HtHiddentroubleannexsDO::getIsImg, reqVO.getIsImg())
                .eqIfPresent(HtHiddentroubleannexsDO::getHtStep, reqVO.getHtStep())
                .betweenIfPresent(HtHiddentroubleannexsDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime())
                .orderByDesc(HtHiddentroubleannexsDO::getId));
    }

    default List<HtHiddentroubleannexsDO> selectList(HtHiddentroubleannexsExportReqVO reqVO) {
        return selectList(new LambdaQueryWrapperX<HtHiddentroubleannexsDO>()
                .eqIfPresent(HtHiddentroubleannexsDO::getHtId, reqVO.getHtId())
                .eqIfPresent(HtHiddentroubleannexsDO::getOssId, reqVO.getOssId())
                .eqIfPresent(HtHiddentroubleannexsDO::getIsImg, reqVO.getIsImg())
                .eqIfPresent(HtHiddentroubleannexsDO::getHtStep, reqVO.getHtStep())
                .betweenIfPresent(HtHiddentroubleannexsDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime())
                .orderByDesc(HtHiddentroubleannexsDO::getId));
    }

    List<String> getFileByHtId(Map params);
}
